import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {SubuserTypeQuery,SubuserType,SubuserTypePageResult} from'@/api/occupant/subuser/types'

/**
 * 企业用户-子账户查询
 * @param queryParams
 */
export function casualEntrepreneurItempages(queryParams: SubuserTypeQuery): AxiosPromise<SubuserTypePageResult> {
  return request({
    url: '/web/casualEntrepreneur/itempages',
    method: 'get',
    params:queryParams
  });
}
/**
 * 企业用户-子账户查询
 * @param queryParams
 */
export function subaccountOptions(): AxiosPromise<SubuserTypePageResult> {
  return request({
    url: '/web/casual_check/subaccountOptions',
    method: 'get'
  });
}
/**
 * 企业用户-子账户新增
 * @param queryParams
 */
export function casualEntrepreneurAddItem(queryParams: SubuserType) {
  return request({
    url: '/web/casualEntrepreneur/addItem',
    method: 'post',
    data:queryParams
  });
}
/**
 * 企业用户-子账户修改
 * @param queryParams
 */
export function casualEntrepreneurUpdateItem(queryParams: SubuserType) {
  return request({
    url: '/web/casualEntrepreneur/updateItem',
    method: 'post',
    data:queryParams
  });
}
/**
 * 企业用户-子账户修改
 * @param queryParams
 */
export function casualEntrepreneurDelitem(id: number|string) {
  return request({
    url: '/web/casualEntrepreneur/delitem?id='+id,
    method: 'get',
  });
}
